#ifndef __SERVER__H
#define __SERVER__H

#define N 64
#include "staff_db.h"


typedef struct {
    INFO text;	 //消息内容
    char type; //消息类型
}MSG_C;

typedef struct {
    INFO text;	 //消息内容
    char type; //消息类型
    char error[64]; //错误信息
}MSG_S;


extern MSG_C from_client_msg;
extern MSG_S to_client_msg;

int server_init(void);
int user_login_module(char *name,char *passwd,int sockfd);

int orderuser_change_passwd_module(char *name,char *passwd,int sockfd);

int admin_change_userinfo_module(int sockfd);

int admin_add_userinfo_module(INFO x,int sockfd);

int admin_del_userinfo_module(char *name,int sockfd);

float str_float(char *s);

int user_search_info_module(char *name,int sockfd);








#endif




